﻿@using Smartstore.Web.Models.Catalog

@model ProductDetailsModel

@{
    var showCondition = Model.ShowCondition && Model.LocalizedCondition.HasValue();
    var showSku = Model.ShowSku && Model.Sku.HasValue();
    var showGtin = Model.ShowGtin && Model.Gtin.HasValue();
    var showMpn = Model.ShowManufacturerPartNumber && Model.ManufacturerPartNumber.HasValue();
    var showWeight = Model.ShowWeight && Model.Weight.HasValue();
    var showWidth = Model.ShowDimensions && Model.Width.HasValue();
    var showLength = Model.ShowDimensions && Model.Length.HasValue();
    var showHeight = Model.ShowDimensions && Model.Height.HasValue();

    if (!showCondition && !showSku && !showGtin && !showMpn && !showWeight && !showWidth && !showLength && !showHeight)
    {
        return;
    }
}

<table class="pd-attrs pd-group">
    <tr sm-if="showCondition" class="pd-attr-condition">
        <th scope="row">@T("Products.Condition")</th>
        <td>@Model.LocalizedCondition</td>
    </tr>
    <tr sm-if="showSku" class="pd-attr-sku">
        <th scope="row">@T("Products.Sku")</th>
        <td itemprop="sku">@Model.Sku</td>
    </tr>
    <tr sm-if="showGtin" class="pd-attr-gtin">
        <th scope="row">@T("Products.GTIN")</th>
        <td itemprop="gtin13">@Model.Gtin</td>
    </tr>
    <tr sm-if="showMpn" class="pd-attr-mpn">
        <th scope="row">@T("Products.ManufacturerPartNumber")</th>
        <td itemprop="mpn">@Model.ManufacturerPartNumber</td>
    </tr>
    <tr sm-if="showWeight" class="pd-attr-weight">
        <th scope="row">@T("Products.Weight")</th>
        <td itemprop="weight">@Model.Weight</td>
    </tr>
    <tr sm-if="showWidth" class="pd-attr-width">
        <th scope="row">@T("Products.Width")</th>
        <td itemprop="width">@Model.Width</td>
    </tr>
    <tr sm-if="showLength" class="pd-attr-length">
        <th scope="row">@T("Products.Length")</th>
        <td itemprop="depth">@Model.Length</td>
    </tr>
    <tr sm-if="showHeight" class="pd-attr-height">
        <th scope="row">@T("Products.Height")</th>
        <td itemprop="height">@Model.Height</td>
    </tr>

    <zone name="productdetails_attrs_bottom" />
</table>